---@class components
---@field mod_pono_diving_light_replica component_mod_pono_diving_light_replica

---@class component_mod_pono_diving_light_replica
---@field inst ent
---@field classified ent
local mod_pono_diving_light_replica = Class(
    function(self, inst)
        self.inst = inst
        self.classified = nil
        
        if TheWorld.ismastersim then
            return
        end
    end
)

function mod_pono_diving_light_replica:OnRemoveFromEntity()
    if self.classified ~= nil then
        self.inst:RemoveEventCallback("onremove", self._onremoveclassified, self.classified)
        self.classified = nil
    end
end

function mod_pono_diving_light_replica:AttachClassified(classified)
    self.classified = classified
    self.inst:ListenForEvent("onremove", function()
        self:OnRemoveFromEntity()
    end, classified)
end

return mod_pono_diving_light_replica
